package com.example.demo.service.thread;

import org.springframework.stereotype.Service;

/**
 * @Description: TODO
 * @Author: kangyang
 * @DateTime: 2024/10/17 12:21
 **/
@Service
public class WaitThreadService {

    private static final Object lock = new Object();


    public static void main(String[] args) throws InterruptedException {
        WaitThread waitThread = new WaitThread();


    }

    public void waitTest() throws InterruptedException {

        synchronized (lock) {
            this.wait();
        }

    }
}
